<template>
  <div class="cosult-page">
    <cp-nav-bar title="问诊记录"></cp-nav-bar>
    <van-tabs @click-tab="clickTab" v-model:active="active">
      <van-tab :name="2" title="极速问诊">
        <consultList :type="active"></consultList>
      </van-tab>
      <van-tab :name="1" title="找医生">
        <consultList :type="active"></consultList>
      </van-tab>
      <van-tab :name="3" title="开药问诊">
        <consultList :type="active"></consultList>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import consultList from "./components/consultList.vue";
const active = ref(2);

// 点击菜单项时触发
function clickTab(e: any) {
  console.log(e);
  active.value = e.name;
}
</script>

<style lang="scss" scoped></style>
